<?php


namespace App\Request\common;


use App\Request\CommonRequest;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;

class FileRequest extends CommonRequest
{
    protected $name = '上传信息成功';

    protected $rule = [
        'addFilePath' => [
            'name' => 'required',
            'path' => 'required',
        ],

    ];

    protected $message = [
        'name.required' => '文件名不能为空',
        'path.required' => '上传路径不能为空',
    ];


    /**
     * 验证
     * @param array $params
     * @param string $scenes
     * @return bool
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    public function validated(array $params, string $scenes): bool
    {
        return $this->__validated($params, $scenes);
    }
}